export default {
  props: {
    items: {
      type: Array,
      deafult: () => []
    }
  },
  render: function(createElement) {
    const arr = [];
    if (arr.length) {
      return createElement('ul', arr.map(function(item) {
        return createElement('li', item.name);
      }))
    } else {
      return createElement('div', Array.apply(null, { length: 2 }).map(function (item, index) {
        console.log(index)
        if (index === 0) {
          return createElement("h2", "使用jsx代替template");
        } else {
          return createElement("p", "No items found.");
        }
      }))
    }
  }
}